package com.hanyxx.thread.high;

/**
 * @author layman
 */
public class ConsumerAndProducer {
    public static void main(String[] args) throws InterruptedException {
        BaoZi baozi = new BaoZi();
        Consumer consumer = new Consumer("吃货",baozi);
        Producer producer = new Producer("包子铺",baozi);

        consumer.start();
        //确保consumer先启动
        Thread.sleep(200L);
        producer.start();
    }
}
